-- GENERATED SPELL FOR [Sunblade Physician] --


function spell0_24687(pUnit, Event) --@Inject Poison,Self--
pUnit:FullCastSpellOnTarget(44599,pUnit)
pUnit:RegisterEvent('Sorts_24687', 6000, 1)
end

function spell1_24687(pUnit, Event) --@Inject Poison,Self--
pUnit:FullCastSpellOnTarget(46046,pUnit)
pUnit:RegisterEvent('Sorts_24687', 6000, 1)
end

function spell2_24687(pUnit, Event) --@Prayer of Mending,n/a--
pUnit:FullCastSpellOnTarget(44583,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24687', 0, 1)
end

function spell3_24687(pUnit, Event) --@Prayer of Mending,n/a--
pUnit:FullCastSpellOnTarget(46045,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24687', 0, 1)
end

function Sorts_24687(pUnit, Event)
local choix_sorts_24687 = math.random(0, 3)
if choix_sorts_24687 == 0 then
pUnit:RegisterEvent('spell0_24687', 1, 1)
end
if choix_sorts_24687 == 1 then
pUnit:RegisterEvent('spell1_24687', 1, 1)
end
if choix_sorts_24687 == 2 then
pUnit:RegisterEvent('spell2_24687', 1, 1)
end
if choix_sorts_24687 == 3 then
pUnit:RegisterEvent('spell3_24687', 1, 1)
end
end

function mob24687_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24687', math.random(1500, 3000), 1)
end

function mob24687_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24687_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24687_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24687, 1, 'mob24687_Action')
RegisterUnitEvent(24687, 2, 'mob24687_Leave')
RegisterUnitEvent(24687, 3, 'mob24687_Kill')
RegisterUnitEvent(24687, 4, 'mob24687_Die')
